package main

import "fmt"

//定义结构体
type Book struct{
    name string
    age int
}

func main(){
    var book Book
    book.name = "JackyChen"
    book.age = 11

    fmt.Printf("book = %v\n",book)

    changeBook(&book)
    fmt.Printf("book = %v\n",book)
}

func changeBook(book *Book){
    book.age = 25
}